﻿/*
    This file is part of News Worm.

    News Worm is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    News Worm is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with News Worm.  If not, see <http://www.gnu.org/licenses/>.
 */

using System;
using System.IO;

namespace NewsWorm {
    public class Script {
        public Script( string source, string ScriptPath, string Description, string guid, bool enabled, DateTime created ) {
            m_Source = source;
            m_ScriptPath = ScriptPath;
            m_Description = Description;
            m_Guid = guid;
            m_Enabled = enabled;
            m_Created = created;
        }

        private string m_Guid;
        private string m_Source;
        private string m_ScriptPath;
        private string m_Description;
        private bool m_Enabled;
        private DateTime m_Created;

        public bool Enabled {
            get { return m_Enabled; }
            set { m_Enabled = value; }
        }

        public DateTime CreationDate {
            get { return m_Created; }
        }

        public string Guid {
            get { return m_Guid; }
        }

        public string Source {
            get { return m_Source; }
        }

        public string ScriptPath {
            get { return m_ScriptPath; }
        }

        public string Description {
            get { return m_Description; }
        }

        public override string ToString() {
            return Description + "( " + m_Created.ToString( "yyyy-MM-dd HH:mm" ) + " )";
        }
    }
}
